package com.ruoyi.dynamic.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.utils.CommonUtils;
import com.ruoyi.dynamic.mapper.RoomHeartRecordMapper;
import com.ruoyi.dynamic.model.pojo.entity.RoomHeart;
import com.ruoyi.dynamic.model.pojo.entity.RoomHeartRecord;
import com.ruoyi.dynamic.service.IRoomHeartRecordService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 房间心动交友记录 服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2024-12-16
 */
@Service
public class RoomHeartRecordServiceImpl extends ServiceImpl<RoomHeartRecordMapper, RoomHeartRecord> implements IRoomHeartRecordService {

    @Override
    public List<RoomHeartRecord> getListByStatus(Long roomId, Long roomHeatId, Integer status) {
        return lambdaQuery()
                .eq(RoomHeartRecord::getRoomId, roomId)
                .eq(RoomHeartRecord::getRoomHeartId, roomHeatId)
                .eq(!CommonUtils.isNull(status), RoomHeartRecord::getStatus, status).list();
    }

}
